package cn.dust.design.pattern.structural.proxy.dynamicproxy;

import cn.dust.design.pattern.structural.proxy.IOrderService;
import cn.dust.design.pattern.structural.proxy.Order;
import cn.dust.design.pattern.structural.proxy.OrderServiceImpl;
import cn.dust.design.pattern.structural.proxy.staticproxy.OrderServiceStaticProxy;

/**
 * @Author: dust
 * @Date: 2019/11/27 16:01
 */
public class Test {
    public static void main(String[] args) {
        Order order=new Order();
        order.setUserId(1);
        IOrderService orderServiceDynamicProxy= (IOrderService) new OrderServiceDynamicProxy(new OrderServiceImpl()).bind();
        orderServiceDynamicProxy.saveOrder(order);
    }
}
